package cn.doitedu.rtmk.demo5;

import cn.doitedu.rtmk.beans.UserEvent;
import org.apache.flink.api.common.functions.RuntimeContext;
import org.apache.flink.util.Collector;
import org.roaringbitmap.longlong.Roaring64Bitmap;

import java.io.IOException;

public interface RuleCalculator {

    default void init(RuntimeContext runtimeContext,String ruleParamJson)   throws Exception {};

    void init(RuntimeContext runtimeContext, String ruleParamJson, Roaring64Bitmap preSelectUsersBitmap)   throws Exception;

    void calculate(UserEvent userEvent, Collector<String> out) throws IOException;

}
